<?php


namespace App\Models;


use Illuminate\Database\Eloquent\Model;

class StudentApplication extends Model
{
    protected $table = 'student_application';
    public $fillable = ['club_id', 'school_id', 'class_and_grade_id', 'time_id', 'name', 'phone', 'price','form_id','school_class_name'];

    public function club()
    {
        return $this->belongsTo(Club::class, 'club_id', 'id');
    }

    public function school()
    {
        return $this->belongsTo(School::class, 'school_id', 'id');
    }

    public function class_and_grade()
    {
        return $this->belongsTo(SchoolClassAndGrade::class, 'class_and_grade_id', 'id');
    }

    public function class_and_grade_time()
    {
        return $this->belongsTo(ClassAndGradeTime::class,'time_id','id');
    }
}
